import { CALCULATOR_INCREMENT,CALCULATOR_DECREMENT } from '../constants/ActionTypes'

export default function calculator(state = 0, action) {
    switch (action.type){
        case CALCULATOR_INCREMENT:
            return state + 1;
        case CALCULATOR_DECREMENT:
            return state - 1;
        default:
            return state
    }
}